<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>合成文字</title>
</head>
<body>
<p>
    合成不了，没什么用。
</p>
<canvas></canvas>
<script>
    var canvas = document.getElementsByTagName("canvas")[0];
    var ctx = canvas.getContext('2d');
    var width =  canvas.width;
    var height = canvas.height;

    ctx.font = '20px 黑体'
    ctx.fillText('殢',25,25);

    ctx.font = '18px 黑体'
    var tw = ctx.measureText('歹').width;
    ctx.fillText('歹',75,25);
    ctx.fillText('带',75+tw-3, 25);

</script>
</body>
</html>